package online.heycm.rbac.common.utils;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;

/**
 * @author heycm
 * @since 2024/1/20 17:09
 */
public class MPWrapper {

    private MPWrapper() {}

    public static <T> LambdaQueryWrapper<T> lambdaQuery(Class<T> clazz) {
        return new LambdaQueryWrapper<>(clazz);
    }

    public static <T> LambdaQueryWrapper<T> lambdaQuery(T entity) {
        return new LambdaQueryWrapper<>(entity);
    }

    public static <T> LambdaUpdateWrapper<T> lambdaUpdate(Class<T> clazz) {
        return new LambdaUpdateWrapper<>(clazz);
    }

    public static <T> LambdaUpdateWrapper<T> lambdaUpdate(T entity) {
        return new LambdaUpdateWrapper<>(entity);
    }
}
